var SVG = "http://www.w3.org/2000/svg";
var XLINK = "http://www.w3.org/1999/xlink";

var rot = 0;
function update() {
	var t = setTimeout(function() { update(); }, 10);

	var ship = document.getElementById("ship");
	if (ship) {
		ship.setRotation(rot);
	}

	rot += 1;
}

function buildMap() {
	var svgElem = document.createElementNS (SVG, "svg");
	svgElem.id = "ship";

	svgElem.setAttributeNS (null, 'width', 256);
	svgElem.setAttributeNS (null, 'height', 256);
	svgElem.setAttributeNS (null, 'viewBox', "-103 -103 206 206");

//	svgElem.appendChild(buildImage("ship.png"));

	var g = document.createElementNS (SVG, "g");
	svgElem.setRotation = function(rad) {
	}

	g.appendChild(buildCircle(0, -62, 4, 25, ""));
	g.appendChild(buildCircle(8, -51, 4, 25, ""));
	g.appendChild(buildCircle(-8, -51, 4, 25, ""));
//	tiltGroup(g, Math.PI/4, 210);
	svgElem.appendChild(g);

//	svgElem.appendChild(buildDots(path));
//	var svgContainer = document.getElementById ("svgContainer");
	document.body.appendChild (svgElem);
}
